<html>
<head>
    <title>复习案例</title>
</head>
<script>
    function del(id) {
        if(confirm("您确定删除吗？")){
            document.location.href ="/delete/"+id;
        }
    }
</script>
<body>

<a href="/login_out">退出</a>
<a href="/createview/">新增</a>
<ul>

{%for book in booklist%}
    <li><a href ="/{{book.id}}/">{{book.btitle}}</a>---{{ book.bpub_date|date:"Y-m-d" }}---<a href="/updateview/{{book.id}}">修改</a> &nbsp; <a href="/delete/{{book.id}}">删除</a> &nbsp; <a href="javascript:del({{book.id}})">删除</a> </li>

<!-- <li>{{book.btitle}}&#45;&#45;<a href="/delete{{book.id}}/">删除</a></li>-->
{%endfor%}
</ul>
</body>
</html>